﻿using Bible.Core.Model;
using NUnit.Framework;

namespace Bible.Core.UnitTests.Verse_Tests
{
    [TestFixture]
    [Category("Core.Model.Verse")]
    [Description("Verse constructed with default constructor should")]
    public class Verse_constructed_with_default_constructor_should
    {
        [Test]
        [Description(" have a non null Text property")]
        public void _have_a_non_null_Text_property()
        {
            Assert.That(new Verse().Text, Is.Not.Null,
                "Verse.Text should not be null.");
        }

        [Test]
        [Description(" have an empty Text property")]
        public void _have_an_empty_Text_property()
        {
            Assert.That(new Verse().Text, Is.Empty,
                "Verse.Text should be empty.");
        }
    }

    [TestFixture]
    [Category("Core.Model.Verse")]
    [Description("Verse constructed with string parameter constructor should")]
    public class Verse_constructed_with_string_parameter_constructor_should
    {
        [Test, TestCaseSource("VerseTextCases")]
        [Description(" have the same Text as the constructor parameter")]
        public void _have_the_same_Text_as_the_constructor_parameter(string text)
        {
            var verse = new Verse(text);
            Assert.That(verse.Text, Is.EqualTo(text),
                "Verse.Text should be the same as constructor parameter.");
        }

        private static string[] VerseTextCases = new string[]
        {
            "In the beginning God created the heavens and the earth.", // Genesis 1 : 1 NIV
            "The grace of the Lord Jesus be with God's people. Amen." // Revelation 22 : 21 NIV
        };
    }
}